<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>onresize</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .bord{
            border: 1px dashed #ee2602;
            width: 90%;
            margin: 20px auto;
        }
        .title{
            font-size: 20px;
            font-weight: bold;
            margin: 20px;
        }
        .introduce{
            font-size: 16px;
            margin: 0 0 20px 50px;
        }
        .red{
            color: red;
        }
    </style>
</head>
<body  onresize="alert('You have changed the size of the window')">
<div class="bord">
    <div class="title">onresize</div>
    <div class="introduce">
        onresize 事件会在窗口或框架被调整大小时发生。
        <br/>
        <br/>
        <pre>
            支持的标签：
            &lt;a&gt;, &lt;address&gt;, &lt;b&gt;, &lt;big&gt;, &lt;blockquote&gt;, &lt;body&gt;, &lt;button&gt;, &lt;cite&gt;, &lt;code&gt;,
            &lt;dd&gt;, &lt;dfn&gt;, &lt;div&gt;, &lt;dl&gt;, &lt;dt&gt;, &lt;em&gt;, &lt;fieldset&gt;, &lt;form&gt;, &lt;frame&gt;, &lt;h1&gt; to &lt;h6&gt;,
            &lt;hr&gt;, &lt;i&gt;, &lt;img&gt;, &lt;input&gt;, &lt;kbd&gt;, &lt;label&gt;, &lt;legend&gt;, &lt;li&gt;, &lt;object&gt;, &lt;ol&gt;, &lt;p&gt;,
            &lt;pre&gt;, &lt;samp&gt;, &lt;select&gt;, &lt;small&gt;, &lt;span&gt;, &lt;strong&gt;, &lt;sub&gt;, &lt;sup&gt;, &lt;table&gt;,
            &lt;textarea&gt;, &lt;tt&gt;, &lt;ul&gt;, &lt;var&gt;
        </pre>
    </div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <pre>
        缩放窗口
    </pre>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
        <pre>
            &lt;body  onresize="alert('You have changed the size of the window')"&gt;&lt;/body&gt;
        </pre>
    </div>
</div>
</body>
</html>